Skip to content

Warn when neff ratios exceed 1#495

Closed
utkarshpawade wants to merge 1 commit intostan-dev:masterfrom
utkarshpawade:fix/neff-ratio-upper-bound-validation
Closed

Warn when neff ratios exceed 1#495
utkarshpawade wants to merge 1 commit intostan-dev:masterfrom
utkarshpawade:fix/neff-ratio-upper-bound-validation

Conversation

@utkarshpawade
Copy link
Contributor

Fixes #494

Summary

  • validate_neff_ratio() now issues an rlang::warn() when any values are greater than 1
  • Updated existing tests and added a new expect_warning() assertion

@jgabry
Copy link
Member

jgabry commented Mar 17, 2026

With Stan when ESS (n_eff) exceeds the posterior sample size it is actually often a favorable sign, not a bad one, so I don't actually think we need a warning here.

@jgabry jgabry closed this Mar 17, 2026
@codecov-commenter
Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.66%. Comparing base (a30a706) to head (94c89e0).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #495   +/-   ##
=======================================
  Coverage   98.66%   98.66%           
=======================================
  Files          35       35           
  Lines        5857     5862    +5     
=======================================
+ Hits         5779     5784    +5     
  Misses         78       78           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

validate_neff_ratio() silently accepts values greater than 1

3 participants